<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<style>
.error {
	color: #ff0000;
	font-weight: bold;
}

.bt_view {
	background-color: #8099de;
	border: 1px solid #999;
	width: 80px;
	height: 18px;
	border-radius: 8px;
	border: none;
	margin: 0 0 0 5px;
	font-weight: bold;
	font-size: 0.9em;
	color: #FFF;
	background-image: url(../images/member/dup.jpg);
	background-repeat: repeat-x;
	background-position: center center;
}

table {
	width: 750px;
	border-collapse: collapse;
	text-align: center;
	font-family: 'Trebuchet MS';
}

td,th {
	font-size: 9pt;
	border: 1px solid #ffffff;
	height: 30px;
}

th {
	background-color: #5075dd;
	color: #ffffff;
	font-family: Georgia;
}

tr.alt td {
	color: #000000;
	background-color: #EAF2D3;
}
</style>

<!-- -------------------------------------------------  -->


<h1 align="center">
	Board List <br>
</h1>
<table border="1">
	<tr>
		<th>번호</th>
		<th>제목</th>
		<th>아이디</th>
		<th>조회수</th>
		<th>작성날짜</th>
		<th></th>
	</tr>
	<%-- <c:forEach items="${board }" var="board"> --%>
	<c:forEach begin="${(boardPage -1) * 10 }" end="${size - 1 }"
		var="count" step="1">
		<c:if test="${count - ((boardPage -1) * 10) < 10}">
			<tr>
				<td>${board[size - 1 - count].num }</td>
				<td>${board[size - 1 - count].subject }</td>
				<td>${board[size - 1 - count].id }</td>
				<td>${board[size - 1 - count].hit }</td>
				<td>${board[size - 1 - count].logTime }</td>
				<td>
					<form method="post" action="<c:url value="/board/content"/>">
						<input name="boardSeq" type="hidden"
							value="${board[size - 1 - count].boardSeq }" /> <input
							name="boardPage" type="hidden" value="${boardPage }" /> <input
							type="submit" value="보기" class="bt_view" />
					</form>
				</td>
				<!--  <td><input type="submit" onclick="remove?memberName=${guest.name }" value="삭제" /></td>-->
				<!-- <td><a href="remove?memberName=${guest.name }">remove</a></td> -->

			</tr>
		</c:if>
	</c:forEach>
	<tr>
		<td colspan="8"><c:if test="${size < 10}">
				<a
					href="<c:url value="/board/?boardType=${boardType }&boardPage=1"/>">1
				</a>
						.&nbsp;
					</c:if> <c:forEach begin="1" end="${size }" var="count">
				<c:if test="${count % 10 == 0 }">
					<a
						href="<c:url value="/board/?boardType=${boardType }&boardPage="/>
						<fmt:formatNumber value="${count / 10 }" pattern="" />">
						<fmt:formatNumber value="${count / 10 }" pattern="" />
					</a>
						.&nbsp;
						<c:if test="${(size - count < 10) && (size - count > 0)}">
						<a
							href="<c:url value="/board/?boardType=${boardType }&boardPage="/>
								<fmt:formatNumber value="${count / 10 + 1 }" pattern="" />">
							<fmt:formatNumber value="${count / 10 + 1 }" pattern="" />
						</a>
						.&nbsp;
						</c:if>
				</c:if>

			</c:forEach></td>
	</tr>

</table>